home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -serious- / programming / other / tandem / projects / asmfiles / test07.asm < prev    next >
Assembly Source File  |  1999-09-06  |  1KB  |  51 lines

  1. * test addr tfr
  2.  
  3. * lines without ; or ; too soon
  4. * (but will assemble ok, for Amiga .i's)
  5.  
  6.  moveq #20,d0    ignores lack of ;
  7.  moveq #20,d0;   ignores ; without spc
  8.  
  9. * check ' and " assembly
  10.  
  11.  move.l #20,d0         ;$00000014
  12.  move.l #'abcd',d0     ;abcd
  13.  move.l #'a"cd',d0     ;a"cd
  14.  move.l #'a''cd',d0    ;a'cd
  15.  move.l #'a cd',d0     ;a cd
  16.  move.l #'''''''''',d0 ;''''
  17.  move.l #"abcd",d0     ;abcd
  18.  move.l #"a'cd",d0     ;a'cd
  19.  move.l #"a""cd",d0    ;a"cd
  20.  move.l #"a cd",d0     ;a cd
  21.  move.l #"""""""""",d0 ;""""
  22.  
  23. * check <...> rules
  24.  
  25. fred: macro
  26.  move.l #\1cd',d0      ;abcd
  27.  move.l #\2ef",d0      ; 'ef
  28.  move.l #\3,d0         ;'bc'
  29.  endm
  30.  
  31.  fred <'ab>,<" '>,'''bc'''
  32.  
  33. * check ranges accepted as .B
  34.  dc.b $00000080 ;$000000 can have any
  35.  dc.b $0000007F
  36.  dc.b $FFFFFF80 ;$FFFFFF can have 80-FF
  37.  
  38. * check ranges accepted as .W
  39.  dc.w $00008000 ;$0000 can have any
  40.  dc.w $00007FFF
  41.  dc.w $FFFF8000 ;$FFFF can have 8000-FFFF
  42.  
  43. * check that label of DS.W/DC.W is word-aligned
  44.  dc.b $11
  45. ev1: dc.w $2222 ;ev1 s/be rel addr after fill byte
  46.  dc.b $33
  47. ev2: ds.w 1     ;ev2 s/be rel addr after fill byte
  48.  
  49. ev3: equ ev1    ;value must be even 0064
  50. ev4: equ ev2    ;value must be even 0068
  51.